package com.homework.note.Service;

import com.homework.note.Model.Note;
import com.mongodb.client.gridfs.model.GridFSFile;
import org.bson.types.ObjectId;
import org.springframework.web.multipart.MultipartFile;

import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;
import java.io.IOException;
import java.util.List;
import java.util.Map;


/**
 * @author xjx
 * @date 2019/3/10
 */
public interface NoteService {

    Note createNote(String fatherID) throws Throwable; //增

    List<Note> getNoteList(); //查

    String deleteNote(String id); //删

    Note updateNote(String noteID, String title, String content, MultipartFile file, HttpServletRequest request) throws IOException; //改

    GridFSFile getById(ObjectId objectId);

    String export2word(String noteID, HttpServletRequest request, HttpServletResponse response);

}
